import { request } from '../utils'
export async function query (params) {
  if(params.keyword){
      const url = '/withdraw/queryWithdraw?jsessionid=' + localStorage.getItem("token") + '&length=' + params.pageSize + '&offset=' + (params.current-1) + 
      '&field=' + params.field + '&keyword=' + params.keyword +"&autStatus="+params.autStatus;
      return request(url, {
        method: 'get',
        data: params
      })
  }else{
      const url = '/withdraw/queryWithdraw?jsessionid=' + localStorage.getItem("token") + '&length=' + params.pageSize + '&offset=' + (params.current-1)+"&autStatus="+params.autStatus
      return request(url, {
        method: 'get',
        data: params
      })
  }
}
export async function withdrawAudit (params) {
  const url = '/verify/withdrawAudit?id='+ params.id +'&state=' + params.state +'&jsessionid=' + localStorage.getItem("token")
  return request(url, {
    method: 'post',
    headers: {'Accept': 'application/json','Content-Type': 'application/json'},
    body: JSON.stringify(params.roleEntry)
  })
}